package com.ruoyi.project.mgcmanage.domain;

import com.ruoyi.framework.web.domain.BaseEntity;

import java.util.Date;
import java.util.Objects;

public class Purchase extends BaseEntity {
    private Integer noId;
    private String  pid;
    private double purchaseTotal;
    private int  purchaseStatus;
    private String purchasePeople;
    private String purchaseOperator;
    private Date purchaseRukuTime;
    private int sid;
    private int auditId;

    private Supplier suppliers;

    public Purchase() {
    }

    public Purchase(Integer noId, String pid, double purchaseTotal, int purchaseStatus, String purchasePeople, String purchaseOperator, Date purchaseRukuTime, int sid, int auditId, Supplier suppliers) {
        this.noId = noId;
        this.pid = pid;
        this.purchaseTotal = purchaseTotal;
        this.purchaseStatus = purchaseStatus;
        this.purchasePeople = purchasePeople;
        this.purchaseOperator = purchaseOperator;
        this.purchaseRukuTime = purchaseRukuTime;
        this.sid = sid;
        this.auditId = auditId;
        this.suppliers = suppliers;
    }

    public Integer getNoId() {
        return noId;
    }

    public void setNoId(Integer noId) {
        this.noId = noId;
    }

    public String getPid() {
        return pid;
    }

    public void setPid(String pid) {
        this.pid = pid;
    }

    public double getPurchaseTotal() {
        return purchaseTotal;
    }

    public void setPurchaseTotal(double purchaseTotal) {
        this.purchaseTotal = purchaseTotal;
    }

    public int getPurchaseStatus() {
        return purchaseStatus;
    }

    public void setPurchaseStatus(int purchaseStatus) {
        this.purchaseStatus = purchaseStatus;
    }

    public String getPurchasePeople() {
        return purchasePeople;
    }

    public void setPurchasePeople(String purchasePeople) {
        this.purchasePeople = purchasePeople;
    }

    public String getPurchaseOperator() {
        return purchaseOperator;
    }

    public void setPurchaseOperator(String purchaseOperator) {
        this.purchaseOperator = purchaseOperator;
    }

    public Date getPurchaseRukuTime() {
        return purchaseRukuTime;
    }

    public void setPurchaseRukuTime(Date purchaseRukuTime) {
        this.purchaseRukuTime = purchaseRukuTime;
    }

    public int getSid() {
        return sid;
    }

    public void setSid(int sid) {
        this.sid = sid;
    }

    public int getAuditId() {
        return auditId;
    }

    public void setAuditId(int auditId) {
        this.auditId = auditId;
    }

    public Supplier getSuppliers() {
        return suppliers;
    }

    public void setSuppliers(Supplier suppliers) {
        this.suppliers = suppliers;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Purchase purchase = (Purchase) o;
        return noId == purchase.noId &&
                Double.compare(purchase.purchaseTotal, purchaseTotal) == 0 &&
                purchaseStatus == purchase.purchaseStatus &&
                sid == purchase.sid &&
                auditId == purchase.auditId &&
                Objects.equals(pid, purchase.pid) &&
                Objects.equals(purchasePeople, purchase.purchasePeople) &&
                Objects.equals(purchaseOperator, purchase.purchaseOperator) &&
                Objects.equals(purchaseRukuTime, purchase.purchaseRukuTime) &&
                Objects.equals(suppliers, purchase.suppliers);
    }

    @Override
    public int hashCode() {
        return Objects.hash(noId, pid, purchaseTotal, purchaseStatus, purchasePeople, purchaseOperator, purchaseRukuTime, sid, auditId, suppliers);
    }

    @Override
    public String toString() {
        return "Purchase{" +
                "noId=" + noId +
                ", pid='" + pid + '\'' +
                ", purchaseTotal=" + purchaseTotal +
                ", purchaseStatus=" + purchaseStatus +
                ", purchasePeople='" + purchasePeople + '\'' +
                ", purchaseOperator='" + purchaseOperator + '\'' +
                ", purchaseRukuTime=" + purchaseRukuTime +
                ", sid=" + sid +
                ", auditId=" + auditId +
                ", suppliers=" + suppliers +
                '}';
    }
}
